<style>
.wrap1{
    background:url('/images/site_image/bg8.jpg');
    background-size:100% 100%;
}
</style>
<?php
$db = new DBQuery;
$sql = 'SELECT MAX(pro_id) FROM product';

//Sản phẩm mới nhất (cập nhật theo id)
$prohot = $db->loadResult($sql);
$sql = 'SELECT pro_id, pro_cat_id, pro_name, pro_image,pro_information_summary FROM product WHERE pro_id = '.$prohot;
$prohot = $db->loadRow($sql);
if(!$prohot){
	redirect('/home');
}
//Lấy tên loại sản phẩm tương ứng
$catname = $db->loadResult('SELECT cat_name FROM categories WHERE cat_id = '.$prohot['pro_cat_id']);
//Lấy ra các ảnh sản phẩm
$pro_slide = $db->loadColumn('SELECT img_name 
                              FROM image_products 
                              WHERE img_pro_id = '.$prohot['pro_id'].' 
                              LIMIT 0,5','img_name');
?>
<link rel="stylesheet" type="text/css" href="/css/pikachoose/styles/right.css" />
<div class="wrapContent">
    <div class="tabContent">
    	<h2 class="tabContentTitle">Sản phẩm mới &nbsp;&raquo;&nbsp;<span class="tabContentTitleC2"><?php echo $catname?>&nbsp;&raquo;&nbsp;</span><span class="tabContentTitleC2"><?php echo $prohot['pro_name'] ?></span></h2>
    </div>
    <div class="mainContent">
    	<div class="slide">
            <ul class="thumbs fl">
            <?php foreach($pro_slide as $pro_img):?>
        		<li><a href="#"><img class="slideTopSmallImg" src="<?php echo $path_img_product_slide . $pro_img?>"/></a></li>
            <?php endforeach; ?>
            </ul>
            <script>
                $('.thumbs').PikaChoose({});
            </script>
    	</div>
    </div>
</div>
<div class="infoProduct">
	<b>Thông số kỹ thuật</b>
	<br/>
		<?php echo nl2br($prohot['pro_information_summary'])?>
		<?php echo nl2br($prohot['pro_information_summary'])?>
		<?php echo nl2br($prohot['pro_information_summary'])?>
		<?php echo nl2br($prohot['pro_information_summary'])?>
		<?php echo nl2br($prohot['pro_information_summary'])?>
</div>
<div class="aboutProduct">Thông tin</div>
<script>
    $('.aboutProduct').click(function(){
		$(this).animate({
			left:'1034px',
			opacity:1,
		});
        $('.infoProduct').animate({
            width:'250px',
			height:'auto',
			opacity:1,
        });
    });
	
</script>